package com.yanyeori.utilscollection.aliyunoss;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * OSS 配置信息
 *
 * @author chenkuan
 * @since 2022/9/29 16:08
 */
@Configuration
@ConfigurationProperties(prefix = "oss")
public class OssConfig {
    //http访问头
    private String http = "https://";
    //地域节点
    private String endpoint = "oss-cn-hangzhou.aliyuncs.com";
    //bucket桶名称
    private String bucketName = "cnhz-scc-uat-healthlogs";
    //RAM账号accessKeyId
    private String accessKeyId;
    //RAM账号accessKeySecret
    private String accessKeySecret;
    //url过期时间，默认30分钟(秒)
    private long urlExpiration = 60 * 30;
    //桶是否公共读
    private boolean publicRead = false;

    public String getHttp() {
        return http;
    }

    public void setHttp(String http) {
        this.http = http;
    }

    public String getEndpoint() {
        return endpoint;
    }

    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }

    public String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    public String getAccessKeyId() {
        return accessKeyId;
    }

    public void setAccessKeyId(String accessKeyId) {
        this.accessKeyId = accessKeyId;
    }

    public String getAccessKeySecret() {
        return accessKeySecret;
    }

    public void setAccessKeySecret(String accessKeySecret) {
        this.accessKeySecret = accessKeySecret;
    }

    public long getUrlExpiration() {
        return urlExpiration;
    }

    public void setUrlExpiration(long urlExpiration) {
        this.urlExpiration = urlExpiration;
    }

    public boolean isPublicRead() {
        return publicRead;
    }

    public void setPublicRead(boolean publicRead) {
        this.publicRead = publicRead;
    }
}
